package com.ht.pms.core.feign;

import com.ht.pms.core.dto.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "ussp-uaa-app")
@RequestMapping("/external")
public interface GatewayFeign {
    /**
     * 创建salaryToken
     *
     * @return
     */
    @PostMapping(value = "/createSalaryToken", headers = {"app=PMS"}, consumes = "application/json; charset=utf-8", produces = "application/json; charset=utf-8")
    @ResponseBody
    public String createSalaryToken(@RequestParam("jobNumber") String jobNumber, @RequestParam("batchNumber") String batchNumber, @RequestParam("sendType") Integer sendType, @RequestParam("tokenTime") Integer tokenTime, @RequestParam("type") Integer type);

    /**
     * 解析token
     *
     * @return
     */
    @PostMapping(value = "/validateSalaryJwt", headers = {"app=PMS"}, consumes = "application/json; charset=utf-8", produces = "application/json; charset=utf-8")
    @ResponseBody
    public String validateSalayJwt(@RequestParam("tokenPayload") String tokenPayload);
}
